﻿using System;
using System.Collections.Generic;

using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Profile;
using System.Data;
namespace WebSite.cn
{
    public partial class news_01 : System.Web.UI.Page
    {
        // Fields
        public string author = "";

        public string classname = "新闻中心";

        public string newscontent = "";
        public string newsname = "";
        public string updatetime = "";

        // Methods
        private void Bind()
        {
            DataTable table = SQLAccess.GreatDs("select classname from DB_Newsclass where classid=" + base.Request.QueryString["tid"] + "").Tables[0];
            if (table.Rows.Count > 0)
            {
                this.classname = table.Rows[0][0].ToString();
            }
            table = SQLAccess.GreatDs("select newsname,newscontent,author,updatetime from DB_News where newsid=" + base.Request.QueryString["nid"] + "").Tables[0];
            if (table.Rows.Count > 0)
            {
                this.newsname = table.Rows[0]["newsname"].ToString();
                this.newscontent = table.Rows[0]["newscontent"].ToString();
                this.updatetime = table.Rows[0]["updatetime"].ToString();
                this.author = table.Rows[0]["author"].ToString();
            }
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            if ((!base.IsPostBack && (base.Request.QueryString["tid"] != null)) && (base.Request.QueryString["nid"] != null))
            {
                this.Bind();
            }
        }

  

    }
}